<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
    <link rel="stylesheet"
          href="${basePath}/public/css/adminbase.css">
    <script type="text/javascript">
        function initTianQi() {
            var res = document.getElementById("result");
            var myDate = new Date();
            var hours = myDate.getHours();
            if (hours < 12) {
                res.textContent = myDate.toTimeString();
                res.innerText = "早上好";
            }
            if (hours > 12 && hours < 14) {
                res.innerText = "中午好";
            }
            if (hours > 14 && hours < 18) {
                res.innerText = "下午好";
            }
            if (hours > 18) {
                res.innerText = "晚上好";
            }
        }
        window.onload = function() {
            initTianQi();
        }
    </script>
</head>
<body>
<div class="place">
    <span>位置：</span>
    <ul class="placeul">
        <li><a href="#">首页</a></li>
    </ul>
</div>
<div class="mainindex">
    <div class="welinfo">
        <span><img src="${basePath}/public/images/sun.png" alt="天气"></span> <b><span
            id="result"></span>:${list.username}&nbsp;欢迎使用信息管理系统</b>(admin@uimaker.com)
    </div>
    <div class="welinfo">
        <span><img src="${basePath}/public/images/time.png" alt="时间"></span> <i>您上次登录的时间：<fmt:formatDate
            value="${list.lastLoginTime}"
            pattern="yyyy年MM月dd日  HH:mm:ss" /></i>
    </div>
    <div class="formtitle">
        <span>常用功能</span>
    </div>
    <div class="toolsli">
        <ul class="toollist">
            <li><a
                    href="${basePath}/admin/order/index.html"><img
                    src="${basePath}/public/images/i06.png"></a>
                <h2>订单</h2></li>
            <li><a
                    href="${basePath}/admin/work/list.html"><img
                    src="${basePath}/public/images/i07.png"></a>
                <h2>系统用户</h2></li>
            <li><a
                    href="${basePath}/admin/news/index.html"><img
                    src="${basePath}/public/images/icon01.png"></a>
                <h2>新闻资讯</h2></li>
        </ul>
    </div>
</div>
</body>
</html>